package org.example.pckage4;


/**
 * 添加引用类型
 */
public class Student {
    private String name;
    private int age;

    //声明引用类型
    private School school;

    public Student() {
    }


    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setSchool(School school) {
        this.school = school;
    }

    @Override
    public String toString() {
        return this.name+"-"+this.age+"-"+this.school;
    }


}
